package com.gjy.disruptor.db;

import com.lmax.disruptor.EventTranslator;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-08-07 11:09:20
 */
public class DbEntityEventTranslator implements EventTranslator<DbEntity> {

    private String sql;

    public DbEntityEventTranslator() {
    }

    public DbEntityEventTranslator(String sql) {
        this.sql = sql;
    }

    @Override
    public void translateTo(DbEntity event, long sequence) {
        event.setSql(sql);
    }

}
